package com.xiaoxi.abstractfactorymode;

import com.xiaoxi.abstractfactorymode.factory.IFactory;
import com.xiaoxi.abstractfactorymode.factory.ILink;
import com.xiaoxi.abstractfactorymode.factory.IPage;
import com.xiaoxi.abstractfactorymode.factory.ITray;
import com.xiaoxi.abstractfactorymode.listfactory.ListFactory;

/**
 * @ClassName Main
 * @Description
 * @Author xiaoxi
 * @Date 2023/3/12 21:01
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        IFactory factory = new ListFactory();
        ILink link = factory.createILink("百度", "www.baidu.com");

        ITray iTray = factory.createITray("谷歌");
        iTray.add(link);

        IPage iPage = factory.createIPage("百度一下", "萧兮");
        iPage.add(iTray);
        iPage.output();

    }
}
